3.1.49 \(\int \log (c (a+b \sqrt {x})^p) \, dx\) [49]

Optimal. Leaf size=53 \[ \frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \]

[Out]

-1/2*p*x-a^2*p*ln(a+b*x^(1/2))/b^2+x*ln(c*(a+b*x^(1/2))^p)+a*p*x^(1/2)/b

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2498, 272, 45} \begin {gather*} -\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right )+\frac {a p \sqrt {x}}{b}-\frac {p x}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(a*p*Sqrt[x])/b - (p*x)/2 - (a^2*p*Log[a + b*Sqrt[x]])/b^2 + x*Log[c*(a + b*Sqrt[x])^p]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rubi steps

\begin {align*} \int \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \, dx &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-\frac {1}{2} (b p) \int \frac {\sqrt {x}}{a+b \sqrt {x}} \, dx\\ &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \frac {x^2}{a+b x} \, dx,x,\sqrt {x}\right )\\ &=x \log \left (c \left (a+b \sqrt {x}\right )^p\right )-(b p) \text {Subst}\left (\int \left (-\frac {a}{b^2}+\frac {x}{b}+\frac {a^2}{b^2 (a+b x)}\right ) \, dx,x,\sqrt {x}\right )\\ &=\frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 53, normalized size = 1.00 \begin {gather*} \frac {a p \sqrt {x}}{b}-\frac {p x}{2}-\frac {a^2 p \log \left (a+b \sqrt {x}\right )}{b^2}+x \log \left (c \left (a+b \sqrt {x}\right )^p\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(a + b*Sqrt[x])^p],x]

[Out]

(a*p*Sqrt[x])/b - (p*x)/2 - (a^2*p*Log[a + b*Sqrt[x]])/b^2 + x*Log[c*(a + b*Sqrt[x])^p]

________________________________________________________________________________________

Maple [A]
time = 0.28, size = 52, normalized size = 0.98

method result size
default \(x \ln \left (c \left (a +b \sqrt {x}\right )^{p}\right )-\frac {p b \left (-\frac {2 \left (-\frac {b x}{2}+a \sqrt {x}\right )}{b^{2}}+\frac {2 a^{2} \ln \left (a +b \sqrt {x}\right )}{b^{3}}\right )}{2}\) \(52\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(a+b*x^(1/2))^p),x,method=_RETURNVERBOSE)

[Out]

x*ln(c*(a+b*x^(1/2))^p)-1/2*p*b*(-2/b^2*(-1/2*b*x+a*x^(1/2))+2*a^2/b^3*ln(a+b*x^(1/2)))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 50, normalized size = 0.94 \begin {gather*} -\frac {1}{2} \, b p {\left (\frac {2 \, a^{2} \log \left (b \sqrt {x} + a\right )}{b^{3}} + \frac {b x - 2 \, a \sqrt {x}}{b^{2}}\right )} + x \log \left ({\left (b \sqrt {x} + a\right )}^{p} c\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="maxima")

[Out]

-1/2*b*p*(2*a^2*log(b*sqrt(x) + a)/b^3 + (b*x - 2*a*sqrt(x))/b^2) + x*log((b*sqrt(x) + a)^p*c)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 51, normalized size = 0.96 \begin {gather*} -\frac {b^{2} p x - 2 \, b^{2} x \log \left (c\right ) - 2 \, a b p \sqrt {x} - 2 \, {\left (b^{2} p x - a^{2} p\right )} \log \left (b \sqrt {x} + a\right )}{2 \, b^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="fricas")

[Out]

-1/2*(b^2*p*x - 2*b^2*x*log(c) - 2*a*b*p*sqrt(x) - 2*(b^2*p*x - a^2*p)*log(b*sqrt(x) + a))/b^2

________________________________________________________________________________________

Sympy [A]
time = 0.75, size = 61, normalized size = 1.15 \begin {gather*} - \frac {b p \left (\frac {2 a^{2} \left (\begin {cases} \frac {\sqrt {x}}{a} & \text {for}\: b = 0 \\\frac {\log {\left (a + b \sqrt {x} \right )}}{b} & \text {otherwise} \end {cases}\right )}{b^{2}} - \frac {2 a \sqrt {x}}{b^{2}} + \frac {x}{b}\right )}{2} + x \log {\left (c \left (a + b \sqrt {x}\right )^{p} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(a+b*x**(1/2))**p),x)

[Out]

-b*p*(2*a**2*Piecewise((sqrt(x)/a, Eq(b, 0)), (log(a + b*sqrt(x))/b, True))/b**2 - 2*a*sqrt(x)/b**2 + x/b)/2 +
 x*log(c*(a + b*sqrt(x))**p)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 97 vs. \(2 (45) = 90\).
time = 4.46, size = 97, normalized size = 1.83 \begin {gather*} \frac {\frac {{\left (2 \, {\left (b \sqrt {x} + a\right )}^{2} \log \left (b \sqrt {x} + a\right ) - 4 \, {\left (b \sqrt {x} + a\right )} a \log \left (b \sqrt {x} + a\right ) - {\left (b \sqrt {x} + a\right )}^{2} + 4 \, {\left (b \sqrt {x} + a\right )} a\right )} p}{b} + \frac {2 \, {\left ({\left (b \sqrt {x} + a\right )}^{2} - 2 \, {\left (b \sqrt {x} + a\right )} a\right )} \log \left (c\right )}{b}}{2 \, b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(a+b*x^(1/2))^p),x, algorithm="giac")

[Out]

1/2*((2*(b*sqrt(x) + a)^2*log(b*sqrt(x) + a) - 4*(b*sqrt(x) + a)*a*log(b*sqrt(x) + a) - (b*sqrt(x) + a)^2 + 4*
(b*sqrt(x) + a)*a)*p/b + 2*((b*sqrt(x) + a)^2 - 2*(b*sqrt(x) + a)*a)*log(c)/b)/b

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 47, normalized size = 0.89 \begin {gather*} x\,\ln \left (c\,{\left (a+b\,\sqrt {x}\right )}^p\right )-\frac {p\,\left (b^2\,x+2\,a^2\,\ln \left (a+b\,\sqrt {x}\right )-2\,a\,b\,\sqrt {x}\right )}{2\,b^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(a + b*x^(1/2))^p),x)

[Out]

x*log(c*(a + b*x^(1/2))^p) - (p*(b^2*x + 2*a^2*log(a + b*x^(1/2)) - 2*a*b*x^(1/2)))/(2*b^2)

________________________________________________________________________________________